package com.nvn.washiodriver.Objects;

public class Order {
	private String objectId, customer, address, latitude, longitude, phone,
			esTime, esDistance, driverNote, cusNote, adminNote, time,
			adressNote, zip, serviceType;
	private boolean isPickUp, isDropOff, isVip;
	private OrderStatus oStatus;
	private int laundryCount, dryCleanCout;

	public Order() {
	}

	
	
	public String getServiceType() {
		return serviceType;
	}



	public void setServiceType(String serviceType) {
		this.serviceType = serviceType;
	}



	public boolean isVip() {
		return isVip;
	}



	public void setVip(boolean isVip) {
		this.isVip = isVip;
	}



	public int getLaundryCount() {
		return laundryCount;
	}

	public String getZip() {
		return zip;
	}

	public void setZip(String zip) {
		this.zip = zip;
	}

	public void setLaundryCount(int laundryCount) {
		this.laundryCount = laundryCount;
	}

	public int getDryCleanCout() {
		return dryCleanCout;
	}

	public void setDryCleanCout(int dryCleanCout) {
		this.dryCleanCout = dryCleanCout;
	}

	public boolean isDropOff() {
		return isDropOff;
	}

	public void setDropOff(boolean isDropOff) {
		this.isDropOff = isDropOff;
	}

	public String getAdminNote() {
		return adminNote;
	}

	public void setAdminNote(String adminNote) {
		this.adminNote = adminNote;
	}

	public String getCusNote() {
		return cusNote;
	}

	public void setCusNote(String cusNote) {
		this.cusNote = cusNote;
	}

	public String getObjectId() {
		return objectId;
	}

	public void setObjectId(String objectId) {
		this.objectId = objectId;
	}

	public String getCustomer() {
		return customer;
	}

	public void setCustomer(String customer) {
		this.customer = customer;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getLatitude() {
		return latitude;
	}

	public void setLatitude(String latitude) {
		this.latitude = latitude;
	}

	public String getLongitude() {
		return longitude;
	}

	public void setLongitude(String longitude) {
		this.longitude = longitude;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getEsTime() {
		return esTime;
	}

	public void setEsTime(String esTime) {
		this.esTime = esTime;
	}

	public String getEsDistance() {
		return esDistance;
	}

	public void setEsDistance(String esDistance) {
		this.esDistance = esDistance;
	}

	public String getDriverNote() {
		return driverNote;
	}

	public void setDriverNote(String driverNote) {
		this.driverNote = driverNote;
	}

	public String getTime() {
		return time;
	}

	public void setTime(String time) {
		try {
			String time1 = "", time2 = "", ampm = "AM";
			int twoDotIndex = time.indexOf(":");
			int hour = Integer.parseInt(time.substring(0, twoDotIndex));
			int min = Integer.parseInt(time.substring(twoDotIndex + 1));

			if (hour >= 12) {
				ampm = "PM";
			}
			hour = (hour > 12) ? hour % 12 : hour;

			int hour2 = hour, min2 = min;
			if (min2 != 0) {
				min2 = 0;
				hour2 += 1;
			} else {
				min2 += 30;
			}
			hour2 = (hour2 > 12) ? hour2 % 12 : hour2;

			time1 = hour + ":" + ((min < 10) ? ("0" + min) : min);
			time2 = hour2 + ":" + ((min2 < 10) ? ("0" + min2) : min2);

			this.time = time1 + " - " + time2 + " " + ampm;
		} catch (Exception e) {
			this.time = time;
		}

	}

	public boolean isPickUp() {
		return isPickUp;
	}

	public void setPickUp(boolean isPickUp) {
		this.isPickUp = isPickUp;
	}

	public OrderStatus getoStatus() {
		return oStatus;
	}

	public void setoStatus(OrderStatus oStatus) {
		this.oStatus = oStatus;
	}

	public String getAdressNote() {
		return adressNote;
	}

	public void setAdressNote(String adressNote) {
		this.adressNote = adressNote;
	}

}
